import type { resumeAnalysisResult, resumeListInfo} from "@/types/resumeList"
import { sendRequest } from "@/utils/http"

// 获取简历列表，我的简历 列表展示的onload里面触发
export const getResumeListAPI = (pageNum:number,pageSize:number,userId:number) => {
  return sendRequest<resumeListInfo[]>({
    url: '/server-interview/resume/getResumeListByUserId',
    method: 'GET',
    data: {userId:userId, pageNum: pageNum, pageSize: pageSize}
  })

}

export const getInterviewQuestionsAPI = (resume:resumeListInfo) => {
  return sendRequest<string[]>({
    url: '/server-ai/interview/getInterviewQuestions',
    method: 'POST',
    data: resume
  })
}


// 获取简历分析结果
export const getResumeAnalysisAPI = (resume: resumeListInfo) => {
  return sendRequest<resumeAnalysisResult>({
    url: '/server-ai/resume/getResumeAnalysis',
    method: 'POST',
    data: resume
  })
}